package Arrays方法;

import java.util.Arrays;

public class text3 {
    public static void main(String[] args) {
        int[] arr = {3,1,6,4,5,2,9,7,8};

        String s1 = arr.toString();
        String string = Arrays.toString(arr);
        System.out.println(s1);
        System.out.println(string);

        for (int i : arr) {
            System.out.print(i + " ");
        }

        System.out.println();

        Arrays.sort(arr);
        System.out.println(Arrays.toString(arr));

        for (int i : arr) {
            System.out.print(i + " ");
        }
    }
}
